package com.mall.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mall.DTO.StatisWareDTO;
import com.mall.mapper.OrderDetailMapper;
import com.mall.pojo.OrderDetail;
import com.mall.service.IOrderDetailService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author xiao-chen
 * @since 2023-04-20
 */
@Service
public class OrderDetailServiceImpl extends ServiceImpl<OrderDetailMapper, OrderDetail> implements IOrderDetailService {
    @Resource
    private OrderDetailMapper orderDetailMapper;


    @Override
    public List<StatisWareDTO> getWareStatis() {
        return orderDetailMapper.getWareStatis();
    }

    @Override
    public List<StatisWareDTO> listWareStatisByWareId(Long wareId,Integer page,Integer pageSize) {

        return orderDetailMapper.listWareStatisByWareId(wareId,(page-1)*pageSize,pageSize);
    }
}
